//package com.mjw.tender.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.http.SessionCreationPolicy;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
//import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
//
//@EnableResourceServer
//@Configuration
//@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true, jsr250Enabled = true)
//public class ResourceConfig extends ResourceServerConfigurerAdapter  {
//
//
//    @Override
//    public void configure(HttpSecurity http) throws Exception {
////        http
////                .requestMatchers().antMatchers("/api/**")//加上这句代表有api开头的会被当做资源去处理，否则的话当做security内置的url去处理
////                .and().authorizeRequests().anyRequest().authenticated();
//        http
//                .exceptionHandling()
//                .and()
//                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
//                .and()
//                .authorizeRequests()
//                .antMatchers("/**").hasAuthority("System");
//    }
//}
